package com.tboss.am.dao;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import com.tboss.am.dto.AMDto;
import com.tboss.am.dto.ResourceCollectorDto;
import com.tboss.global.helpers.sqlSession.SqlSessionSupport;

@Repository("amDao")
public class AMDao extends SqlSessionSupport  {
	
	@Autowired
	public AMDao(@Qualifier("sqlSession") SqlSession sqlSession){
		super(sqlSession);
	}

	public String getNameSpace() {
		return "am";
	}

	public List<AMDto> selectAll(){
		return super.queryForList("selectAll");		
	}
	
//	public List<ResourceCollectorDto> selectRscList(int svrNum){
//		return super.queryForList("selectRscList", svrNum);
//	}

	public List<ResourceCollectorDto> selectRscList(){
		return super.queryForList("selectRscList");
	}

	public List<ResourceCollectorDto> selectSvrRscList(int svrNum){
		return super.queryForList("selectSvrRscList", svrNum);
	}
	
	public ResourceCollectorDto selectMaxOne(int svrNum){
		return super.queryForObject("selectMaxOne", svrNum);
	}
	
	/*
	public void insert(ServerInfoDto serverInfoDto){
		super.queryForObject("insert", serverInfoDto);
	}
	
	public void update(ServerInfoDto serverInfoDto){
		super.queryForObject("update", serverInfoDto);
	}
	
	public void delete(int svrNum){
		super.queryForObject("delete", svrNum);
	}
	*/
}
